import axios from "@/utils/axios";

export default {
    // 根据幼儿园 ID 获取幼儿园信息
    getSchool(schoolId) {
        return axios.get('/schools/getSchool', {
            params: {
                schoolId: schoolId
            }
        })
    },
    // 创建幼儿园
    createSchool(school) {
        return axios.post('/schools', school)
    },
    // 更新幼儿园
    updateSchool(school) {
        return axios.put('/schools', school)
    },
    // 删除幼儿园
    deleteSchool(schoolId) {
        return axios.delete('/schools/' + schoolId)
    },
    // admin页面 根据用户获取其管理范围内所有幼儿园及下面的班级列表
    getSchoolsGroupByUserId(userId) {
        return axios.get('/schools/getSchoolsGroupByUserId', {
            params: {
                userId: userId
            }
        })
    },
    //【首页】 根据用户获取其管理范围内所有幼儿园的 ID 和 Name
    getSchoolsIdNameByUserId(userId) {
        return axios.get('/schools/getSchoolsIdNameByUserId', {
            params: {
                userId: userId
            }
        })
    },
    // 【首页】获取幼儿园信息及下面的班级列表
    getSchoolAndGroupInfo(schoolId) {
        return axios.get('/schools/getSchoolAndGroupInfo', {
            params: {
                schoolId: schoolId
            }
        })
    },

    // DRDPReportFilter
    getStudentReportFilter() {
        return axios.get('/schools/DRDPReportFilter')
    },
}
